package com.yfl.tingyu.controller;


import com.yfl.tingyu.pojo.HostPower;
import com.yfl.tingyu.service.impl.HostPowerServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2020-05-30
 */
@Controller
@RequestMapping("/hostPower")
public class HostPowerController {

    @Autowired
    private HostPowerServiceImpl hostPowerService;

    @RequestMapping("/hostPowerSet")
    @ResponseBody
    public Boolean hostPowerSet(@RequestParam("hostids") Integer[] hpid,
                                HostPower hostPower) {

        Boolean result = hostPowerService.hostPowerSet(hpid, hostPower);

        return result;
    }
}

